import request from '@/utils/request'

let gameDictionaryApi = {
  // 
  getList(data) {
    return request({
      url: '/game/attribute/list',
      method: 'get',
      params:data
    })
  },
  // dange
  getDetail(id) {
    return request({
      url: `/game/attribute/${id}`,
      method: 'get'
    })
  },
  // xinzeng
  add(data) {
    return request({
      url: '/game/attribute',
      method: 'post',
      data
    })
  },
  // 
  edit(data) {
    return request({
      url: '/game/attribute',
      method: 'put',
      data
    })
  },
  // 删除
  del(ids) {
    return request({
      url: `/game/attribute/${ids}`,
      method: 'delete'
    })
  },
  // 子级属性列表
  getChildList(data) {
    return request({
      url: `/game/attribute/keylist`,
      method: 'get',
      params:data
    })
  },
  // 将网络图片保存到属性中
  imgUrlToAttr(data) {
    return request({
      url: `/game/attribute/updateImg`,
      method: 'POST',
      data,
      timeout:1000*60*3
    })
  }

}
export const imgUrlToAttr = gameDictionaryApi.imgUrlToAttr
export default gameDictionaryApi

